<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<script type="text/javascript" src="js/menu.js"></script>
<script type="text/javascript">
	$(function(){
		pageLoad();
	});
	var system_basePath = "<%=basePath %>";
</script>
<!-- /section:settings.box -->
<div class="row">
	<div class="col-xs-12 col-sm-3">
		<ul id="menuTree" class="ztree"></ul>
	</div>
	<div class="col-xs-12 col-sm-6">
		<div class="row" id="menu_from_div">
			<form class="form-horizontal" id="menu_form" onsubmit="return false;" action="../sys/menu/addMenu.do" method="post">
				<div class="form-group">
					<label class="control-label col-xs-12 col-sm-3 no-padding-right"
						for="menu_name">
						菜单名称:
					</label>
					<div class="col-xs-12 col-sm-9">
						<div class="clearfix">
							<input type="text" name="systemMenu.menu_name" id="menu_name"
								class="col-xs-12 col-sm-10 {required:true}" />
						</div>
					</div>
				</div>
				
				<div class="space-2"></div>
				
				<div class="form-group">
					<label class="control-label col-xs-12 col-sm-3 no-padding-right"
						for="menu_url">
						菜单URL:
					</label>
					<div class="col-xs-12 col-sm-9">
						<div class="clearfix">
							<input type="text" name="systemMenu.menu_url" id="menu_url"
								class="col-xs-12 col-sm-10" />
						</div>
					</div>
				</div>
				
				<div class="space-2"></div>
				
				<div class="form-group">
					<label class="control-label col-xs-12 col-sm-3 no-padding-right"
						for="class_style">
						菜单图标:
					</label>
					<div class="col-xs-12 col-sm-9">
						<div class="clearfix">
							<input type="text" name="systemMenu.class_style" id="class_style"
								class="col-xs-12 col-sm-10" />
						</div>
					</div>
				</div>
				<div class="space-2"></div>
				
				<div class="form-group">
					<label class="control-label col-xs-12 col-sm-3 no-padding-right"
						for="status">
						状态:
					</label>
					<div class="col-xs-12 col-sm-9">
						<div class="clearfix">
							<select class="col-xs-12 col-sm-10" id="status" style="height: 34px;" name="systemMenu.status">
								<option value="0" selected="selected" >有效</option>
								<option value="1">无效</option>
							</select>
						</div>
					</div>
				</div>
				
				<div class="space-2"></div>
				
				<div class="form-group">
					<label class="control-label col-xs-12 col-sm-3 no-padding-right"
						for="sort_order">
						排序权重:
					</label>
					<div class="col-xs-12 col-sm-9">
						<div class="clearfix">
							<input type="text" value="0" name="systemMenu.sort_order" id="sort_order"
								class="col-xs-12 col-sm-10" />
						</div>
					</div>
				</div>
				<input type="text" style="display: none;" name="systemMenu.parent_id" id="parent_id" >
				<input type="text" style="display: none;" name="systemMenu.menu_id" id="menu_id" >
				<input type="text" style="display: none;" name="systemMenu.level" id="level" >
				<input type="text" style="display: none;" name="systemMenu.menu_path" id="menu_path" >
				<div class="center" name="edit_button">
				
					<button class="btn btn-primary btn-sm" onclick="btnAddChildrenMenu(this)">
						<i class="ace-icon fa fa-plus-circle bigger-120"></i>
						新增子菜单
					</button>
					
					<button class="btn btn-info btn-sm" onclick="btnAddBtn(this)">
						<i class="ace-icon fa fa-plus bigger-120 "></i>
						添加按钮
					</button>
					
					<button class="btn btn-success btn-sm" onclick="btnEditMenu(this)">
						<i class="ace-icon fa fa-pencil bigger-120 "></i>
						修改
					</button>
					
					<button class="btn btn-warning btn-sm" onclick="delteMenu()">
						<i class="ace-icon fa fa-trash-o bigger-120 orange"></i>
						删除
					</button>

					<button class="btn btn-info btn-sm" style="display: none;" onclick="btnSubmit(this)" name="operation">
						<i class="ace-icon fa fa-floppy-o bigger-120 blue"></i>
						保存菜单
					</button>
					<button class="btn btn-default btn-sm" style="display: none;" onclick="btnCancelOnClick()" name="operation">
						<i class="ace-icon fa fa-times red2"></i>
						取消
					</button>
					
				</div>
			</form>
		</div>
		<div class="row" id="button_form_div" onsubmit="return false;" style="display: none;">
			<form class="form-horizontal" id="button_form" action="../sys/menu/addMenu.do" method="post">
				<div class="form-group">
					<label class="control-label col-xs-12 col-sm-3 no-padding-right"
						for="btn_name">
						按钮名称:
					</label>
					<div class="col-xs-12 col-sm-9">
						<div class="clearfix">
							<input type="text" name="systemButton.btn_name" id="btn_name"
								class="col-xs-12 col-sm-10 {required:true}" />
						</div>
					</div>
				</div>
				
				<div class="space-2"></div>
				
				<div class="form-group">
					<label class="control-label col-xs-12 col-sm-3 no-padding-right"
						for="btn_code">
						按钮编码:
					</label>
					<div class="col-xs-12 col-sm-9">
						<div class="clearfix">
							<input type="text" name="systemButton.btn_code" id="btn_code"
								class="col-xs-12 col-sm-10" />
						</div>
					</div>
				</div>
				<div class="space-2"></div>
				<div class="form-group">
					<label class="control-label col-xs-12 col-sm-3 no-padding-right"
						for="btn_html">
						按钮默认样式:
					</label>
					<div class="col-xs-12 col-sm-9">
						<div class="clearfix">
							<input type="text" name="systemButton.btn_html" id="btn_html"
								class="col-xs-12 col-sm-10" />
						</div>
					</div>
				</div>
				<div class="space-2"></div>
				
				<div class="form-group">
					<label class="control-label col-xs-12 col-sm-3 no-padding-right"
						for="status">
						状态:
					</label>
					<div class="col-xs-12 col-sm-9">
						<div class="clearfix">
							<select class="col-xs-12 col-sm-10" id="status" style="height: 34px;" name="systemButton.status">
								<option value="0" selected="selected" >有效</option>
								<option value="1">无效</option>
							</select>
						</div>
					</div>
				</div>
				<input type="text" style="display: none;" name="systemButton.menu_id" id="parent_id" >
				<input type="text" style="display: none;" name="systemButton.btn_id" id="btn_id" >
				<div class="center" name="edit_button">
					
					<button class="btn btn-success btn-sm" onclick="btnEditBtn(this)">
						<i class="ace-icon fa fa-pencil bigger-120 "></i>
						修改
					</button>
					
					<button class="btn btn-warning btn-sm" onclick="delteButton()">
						<i class="ace-icon fa fa-trash-o bigger-120 orange"></i>
						删除
					</button>

					<button class="btn btn-info btn-sm" style="display: none;" onclick="btnSubmit(this)" name="operation">
						<i class="ace-icon fa fa-floppy-o bigger-120 blue"></i>
						保存按钮
					</button>
					<button class="btn btn-default btn-sm" style="display: none;" onclick="btnCancelOnClick(this)" name="operation">
						<i class="ace-icon fa fa-times red2"></i>
						取消
					</button>
				</div>
			</form>
		</div>
	</div>
</div>


